package edu.cdnu.utils;

import org.apache.shiro.crypto.hash.Md5Hash;

public class PasswordToMD5Utils {
	
	/**
	 * 把密码md5加密
	 * @param password 密码
	 * @param salt  盐
	 * @return
	 */
	public static String PasswordToMD5(String password,String salt) {
		Md5Hash md5=new Md5Hash(password,salt);
		return md5.toString();
	}
	
	/**
	 * 把密码md5加密
	 * 默认密码12346
	 * @param salt 盐
	 * @return
	 */
	public static String PasswordToMD5(String salt) {
		return PasswordToMD5("123456",salt);
	}
	
}
